import { AxiosRequestConfig } from 'axios';
import http from '@/utils/http';

export async function signIn(config?: AxiosRequestConfig<any>) {
    const _config = <AxiosRequestConfig<any>>{
        url: '/api/Web/loginFunction',
        method: 'POST',
        ...config,
    };
    const response = await http.request(_config);
    return response.data;
}

export async function setCollect(config?: AxiosRequestConfig<any>) {
    const _config = <AxiosRequestConfig<any>>{
        url: '/api/CarStyle/ChangeCarStyleCollection',
        method: 'POST',
        ...config,
    };
    const response = await http.request(_config);
    return response.data;
}

export async function getCollect(config?: AxiosRequestConfig<any>) {
    const _config = <AxiosRequestConfig<any>>{
        url: '/api/CarStyle/GetCollectionStyle',
        method: 'POST',
        ...config,
    };
    const response = await http.request(_config);
    return response.data;
}
